// webpack.production.config.js
const webpack = require('webpack');
const MinifyPlugin = require("babel-minify-webpack-plugin");
const path = require('path')


module.exports = {
    entry:  __dirname + "/bin/minVue.js",//已多次提及的唯一入口文件
    // entry: ['babel-polyfill', __dirname + "/bin/minVue.js"],//已多次提及的唯一入口文件
    output: {
        path: __dirname + "/dist",
        filename: "minVue.min.js",
        libraryTarget: 'umd',
        // 组件名称
        library: "minVue"
    },
    module: {
        rules: [
            {
                test: /(\.jsx|\.js)$/,
                use: {
                    loader: "babel-loader"
                },
                exclude: /node_modules/
            },

        ]
    },
    plugins: [
        new MinifyPlugin(),
    ],
};
